package com.sky.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("financial_transaction")
public class FinancialTransaction {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long merchantId;
    private Long withdrawalId;
    private Long orderId;
    /** INCOME / EXPENSE */
    private String direction;
    /** ORDER_INCOME / WITHDRAWAL_PAYOUT / REFUND / ADJUSTMENT */
    private String category;
    private BigDecimal amount;
    private String currency; // e.g. CNY
    private String description;
    private LocalDateTime occurredAt;
    private Long createdByStudentId;
}